<!--<?php print <<<EOT
-->
<!-- ie -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$db_blogname} - powered by phpwind.net</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
*{	padding:0; margin:0; }
html {height:100%; max-height:100%; font-size:12px; }
body {height:100%; line-height:20px; max-height:100%;overflow: hidden; background:url($imgpath/admin/bodybg.gif) repeat-x #d0e6f1;font-family:Verdana;}
h3{ font-size: 12px; }
img{ border-style: none; }
a{ text-decoration: none }
a:hover{ text-decoration: underline }
.c{ clear: both; height: 0; font: 0/0 Arial; width: 100% }
#header { position:absolute;top:0; left:0; display:block; width:100%; height:70px;  z-index: 21; background:url($imgpath/admin/bodybg.gif) repeat-x }
#footer { position:absolute;bottom:0; left:0; display:block; width:100%; height:0px; z-index: 21; background: #D0E6F1}
#innerHeader{ height: 35px; overflow: hidden; display: block;}
#innerFooter{text-align:right; font: 9px Tahoma}
#selector {position:absolute;left:5px;width:96px;}
#tools,#gird,#pages { position:absolute;left: 100px;right: 4px;}
#selector{top:70px; bottom:5px;  z-index: 16;}
#tools{top:70px; z-index: 15;}
#gird{top:70px; bottom:5px;z-index: 9;}
#selector .inner{	height: 100%;overflow:hidden;}
#gird .inner{height: 100%; background:#fff;border:1px solid #005681;overflow:hidden;}

/*heiyo*/
#topguide { margin-top:12px; font-family:Tahoma; float:right;padding-right:40px;}
#topguide li {list-style: none; display: inline;}
#topguide li a{ padding:3px 9px 6px; color: #fff;line-height:16px; display:inline; border:1px solid #9CC7DF; float:none; margin-right:3px;background:#2D81AE}
#topguide li a:hover{color:#FFF600; text-decoration: none; border-bottom:0 ; background:url($imgpath/admin/bodybg.gif) #176FA2 }
#topguide li.li1 a{color:#FFFF00;background:#005681;}
#topguide li.li1 a:hover{ background:#005681;}

/*guide*/
#guide{ padding:5px 0 0;margin: auto;}
#showmenu {z-index:2000; position: absolute}
#showmenu dl{display:block; line-height: 15px; width:105px ; padding:0 1px 1px; background:#fff; border:#ccc 1px solid; border-bottom-color:#000; border-right-color:#000 }
#showmenu dl dd{ border-top:1px solid #ccc; padding:5px 0 }
#showmenu dd a{color:#666;display: list-item;list-style:none;padding:3px 8px 2px; height:auto!important; height:12px;background:url($imgpath/admin/menubg.gif) #fff}
#showmenu dd a:hover{background:#D0E6F1; text-decoration:none; color:#005681}
h1{ display:inline; font: bold 14px/18px Tahoma; color: #FFF600; margin: 0 12px }
.fr{ float: right }
.s0{ color:#fff }
.s1{ color:#9bd }

/*selector*/
#selector .inner dd { text-indent:0em; padding-bottom: 3px}
#selector .inner dt { padding-left: 3px; line-height:150%; font-weight:bold; color: #FF8000}
#selector .inner dd a { padding:0 0 0 10px; display:block;color:#005782; line-height:130%; }
#selector .inner dd a:hover{color:#fff;background: #005681;text-decoration:none; border-right:1px solid  #005681}
#selector .inner dd a.a1 { font-weight: bold; padding:0 0 0 5px; border:1px solid #005681; border-right: 0; background: #fff }
#selector .inner a.a1:hover{ background: #fff;border-right:0;color:#005681}

/*menu*/
#menubg{FILTER: Alpha(opacity=20);opacity:0.2; top: 0px; bottom:0px; left:0; right: 0; background:#000; position: absolute; height:100%; width:100%; z-index:1002 }
#menu { top:30px;	z-index: 1003; position: absolute; width:98%; height: auto; left:1%; right: 1%; background: #fff; border:1px solid #666; border-right:2px #666 solid; border-bottom:2px #666 solid}
#menu .inner{ padding: 0 0 15px;background:url($imgpath/admin/menubg.gif); height:auto!important; height:200px;}
#menu .inner dl{ float: left; padding:10px 10px 0px 10px; display:block }
#menu .inner dl dt{ color:#005681;padding:0px 1px;}
#menu .inner dl a{ display: list-item; list-style: none; color:#222; padding:0px 1px; word-break:keep-all }
#menu .inner dl a:hover{ background: #E9F0C8 }
#menu .inner dl dd{ line-height: 140% ; padding:0 0 5px }
.menu{position:absolute;}
</style>
<!--[if ie]>
<style>
#selector{ height:100%; top:0; bottom:0; border-top:70px solid #d0e6f1; }
#gird{ height:100%; top:0; bottom:0; border-top:70px solid #d0e6f1; border-bottom:5px solid #d0e6f1;}
#topguide li a{ float:left}
</style><![endif]-->
</head>
<body>
<div id="header">
  <div style="background:url($imgpath/admin/logo.gif) no-repeat;">
	<a style="width:120px;height:36px;float:left;display:block;" href="admin.php"></a>
	<div id="innerHeader">
	  <div id="topguide">
		<ul id="topguide-entry">
		  <li><a style="cursor:pointer" onclick="return showmenu();" style="background:none; padding-right:5px;border-color:#9CC7DF">菜单<img src="$imgpath/admin/downer.gif" align="middle" /></a></li>
<!--
EOT;
foreach($headdb as $key=>$value){print <<<EOT
-->
		  <li id="$key" onmouseover="showguide(this.id);"><a style="cursor:pointer" style="cursor:pointer" onclick="return initguide('$key');">$value</a></li>
<!--
EOT;
}print <<<EOT
-->
		</ul>
	  </div>
	</div>
	<div class="c"></div>
	<div id="guide"></div>
  </div>
</div>
<div id="selector">
  <div id="left" class="inner"></div>
</div>
<div id="gird">
  <div class="inner">
	<iframe name="main" frameborder="0" style="height:100%;visibility:inherit;width:99.99%;z-index:1">111</iframe>
  </div>
</div>
<div id="footer">
  <div id="innerFooter"></div>
</div>
<iframe name="notice" frameborder="0" style="height:0;width:0;"></iframe>
<div id="menu" style="display:none"></div>
<div id="showmenu" style="display:none"></div>
<script language="JavaScript">
var agt 	 = navigator.userAgent.toLowerCase();
var is_ie	 = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
$guides
$titles
var cate	 = '$dfcate';
var action	 = '';
var type	 = '';
function uptopguide(id){
	var obj  = document.getElementById('topguide-entry');
	var objs = obj.getElementsByTagName('li');
	for (var i=0;i<objs.length;i++) {
		objs[i].className = objs[i].id==id ? 'li1' : '';
	}
}
function showguide(id){
	var obj 	= document.getElementById('showmenu');
	var guide	= guides[id];
	var html	= '<dl>';
	for (i in guide) {
		var subs = guide[i];
		html += '<dd>';
		for (j in subs) {
			var sub = subs[j];
			html += '<a style="cursor:pointer" onclick="return initguide(\''+id+'\',\''+j+'\')">'+sub[0]+'</a>';
		}
		html += '</dd>';
	}
	obj.innerHTML = html + '</dl>';
	var obj1  = document.getElementById(id);
	var left  = findPosX(obj1) + ietruebody().scrollLeft;
	var top   = findPosY(obj1) + ietruebody().scrollTop + 22;
	obj.style.display = '';
	obj.style.top	= top + 'px';
	obj.style.left	= left + 'px';
	addEvent(document,"mouseout",doc_mouseout);
}
function closeguide(){
	var obj = document.getElementById('showmenu');
	obj.style.display = "none";
	uptopguide(cate);
	removeEvent(document,"mouseout",doc_mouseout);
}
function upleft(t){
	var obj  = document.getElementById('left');
	var objs = obj.getElementsByTagName('a');
	for (var i=0;i<objs.length;i++) {
		objs[i].className = objs[i].id==t ? 'a1' : '';
	}
}
function showleft(id,t,url){
	cate = id;
	var obj 	= document.getElementById('left');
	var html	= '<dl>';
	var guide	= guides[id];
	url  = typeof url	!= 'undefined' ? url : '';
	type = typeof t 	!= 'undefined' ? t	 : '';
	for (i in guide) {
		var subs = guide[i];
		html += '<dt>' + titles[i] + '</dt><dd>';
		for (j in subs) {
			var sub = subs[j];
			html += '<a id="'+j+'" style="cursor:pointer" onclick="return initguide(\''+id +'\',\''+j+'\')">'+sub[0]+'</a>';
			if (url == '') {
				if (type == '') {
					url = sub[1];
					type = j;
				} else if(j == type) {
					url = sub[1];
				}
				action = i;
			}
		}
		html += '</dd>';
	}
	obj.innerHTML = html + '</dl>';
	uptopguide(cate);
	upleft(type);
	parent.main.location = url;
	return false;
}
function showtitle(){
	var obj = document.getElementById('guide');
	var guide = guides[cate];
	var html = '<span class="fr s1" style="margin:0 16px">用户: {$admin_name} 级别: {$admin_level}　|　<a class="s0" href="index.php" target="_blank">博客首页</a>　<a class="s0" href="admin.php">后台首页</a>　<a class="s0" href="admin.php?action=quit">注销</a></span>';
	if (action && type) {
		html += '<h1>' + titles[action] + ' &raquo; ' + guide[action][type][0] + '</h1>';
	} else {
		html += '<h1>后台首页</h1>';
	}
	obj.innerHTML = html;
}
function initguide(id,t,url){
	showleft(id,t,url);
	showtitle();
	return false;
}
function showmenu(){
	var obj = document.getElementById('menu');
	top.main.showselect('hidden');
	if (!IsElement('menubg')) {
		var html = '<div id="menu2" class="inner">';
		for (i in guides) {
			if (i=='common') continue;
			var guide = guides[i];
			html += '<dl>';
			for (j in guide) {
				html += '<dt><h3>' + titles[j] + '</h3></dt><dd>';
				var subs = guide[j];
				for (k in subs) {
					var sub = subs[k];
					html += '<a style="cursor:pointer" onclick="return toguide(\''+i+'\',\''+k+'\')">'+sub[0]+'</a>';
				}
				html += '</dd>';
			}
			html += '</dl>';
		}
		html += '<div><a class="fr" style="color:#ff8800; position:absolute;right:1%;top:1%; cursor:pointer;" onclick="closemenu();">关闭</a></div></div>';
		obj.innerHTML = html;
		var obj2 = document.createElement("div");
		obj2.id = "menubg";
		obj.parentNode.insertBefore(obj2,obj);
	} else {
		var obj2 = document.getElementById('menubg');
		obj2.style.display = '';
	}
	obj.style.display = '';
	addEvent(document,"mousedown",doc_mousedown);
}
function closemenu(){
	var obj = document.getElementById('menu');
	obj.style.display = "none";
	var obj2 = document.getElementById('menubg');
	obj2.style.display = "none";
	removeEvent(document,"mousedown",doc_mousedown);
	top.main.showselect('');
}
function toguide(id,t){
	closemenu();
	initguide(id,t);
	return false;
}
function doc_mousedown(e){
	var e = is_ie ? event: e;
	obj	= document.getElementById("menu");
	_x	= is_ie ? e.x : e.pageX;
	_y	= is_ie ? e.y + ietruebody().scrollTop : e.pageY;
	_x1 = obj.offsetLeft;
	_x2 = obj.offsetLeft + obj.offsetWidth;
	_y1 = obj.offsetTop - 20;
	_y2 = obj.offsetTop + obj.offsetHeight;
	if (_x<_x1 || _x>_x2 || _y<_y1 || _y>_y2) {
	   closemenu();
	}
}
function doc_mouseout(e){
	var e = is_ie ? event: e;
	obj	= document.getElementById("showmenu");
	_x	= is_ie ? e.x : e.pageX;
	_y	= is_ie ? e.y + ietruebody().scrollTop : e.pageY;
	_x1 = obj.offsetLeft + 2;
	_x2 = obj.offsetLeft + obj.offsetWidth;
	_y1 = obj.offsetTop - 20;
	_y2 = obj.offsetTop + obj.offsetHeight;
	if (_x<_x1 || _x>_x2 || _y<_y1 || _y>_y2) {
		closeguide();
	}
}
function IsElement(id){
	return document.getElementById(id)!=null ? true : false;
}
function addEvent(el,evname,func){
	if (is_ie) {
		el.attachEvent("on" + evname,func);
	} else {
		el.addEventListener(evname,func,true);
	}
};
function removeEvent(el,evname,func){
	if (is_ie) {
		el.detachEvent("on" + evname,func);
	} else {
		el.removeEventListener(evname,func,true);
	}
};
function findPosX(obj){
	var curleft = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	} else if (obj.x) {
		curleft += obj.x;
	}
	return curleft - ietruebody().scrollLeft;
}
function findPosY(obj){
	var curtop = 0;
	if (obj.offsetParent){
		while (obj.offsetParent){
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	} else if (obj.y) {
		curtop += obj.y;
	}
	return curtop - ietruebody().scrollTop;;
}
function ietruebody(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}
initguide(cate,type,'$admin_file?action=admin');
document.onkeydown = function() {
	if (window.event.keyCode==27) {
		if (IsElement('menubg')) {
			closemenu();
		}
	}
}
</script>
</body>
</html>
<!--
EOT;
?>-->